Skip to content

Changed admin-surface apps to build with Rolldown via rolldown-vite#29132

Merged
9larsons merged 1 commit into
mainfrom
steve/pla-96-rolldown-admin-apps
Jul 7, 2026
Merged

Changed admin-surface apps to build with Rolldown via rolldown-vite#29132
9larsons merged 1 commit into
mainfrom
steve/pla-96-rolldown-admin-apps

Conversation

@9larsons

@9larsons 9larsons commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

ref PLA-96

Switches the 8 admin apps to build with Rolldown via rolldown-vite (the Vite-7-API fork that swaps Vite's Rollup+esbuild pair for the Rust bundler).

What

Adds a rolldown named catalog in pnpm-workspace.yaml:

catalogs:
  rolldown:
    vite: 'npm:rolldown-vite@7.3.1'

…and the 8 admin apps opt in by changing their vite dep from "vite": "catalog:" to "vite": "catalog:rolldown":

admin, shade, admin-x-framework, posts, stats, admin-x-settings, activitypub, admin-x-design-system

No app config changes are needed — Rolldown is a drop-in for these. The version stays defined once (in the catalog), while each app's package.json now visibly declares that it builds on rolldown.

Note on mechanism: rolldown-vite is a drop-in replacement for the vite package — Vite 7 has no config switch to select the bundler — so adoption is expressed as a dependency alias. A named catalog keeps that explicit and per-app while respecting catalogMode: strict.

Why the public apps are excluded

A repo-wide swap breaks the public UMD apps: portal sets manualChunks: false in its output options, which Rolldown rejects (TypeError: manualChunks is not a function), and Vite deprecates optimizeDeps.rollupOptionsrolldownOptions. Those apps (portal, comments-ui, signup-form, sodo-search, announcement-bar) stay on the stock vite catalog and need their own config work — a follow-up.

Why rolldown-vite@7, not Vite 8

Vite 8 also ships Rolldown, but bundles Vite-8 API changes on top. Pinning to the 7.x line isolates the bundler swap (validated here) from the Vite-8 API migration (a separate, later step). rolldown-vite carries an npm deprecation notice pointing at Vite 8 — that's expected; it's the supported Vite-7 migration path.

Benchmarks

Local vite build, min of 3 runs, Vite 7.3.2 + Rollup → rolldown-vite 7.3.1:

app Rollup Rolldown speedup
admin-x-framework 0.57s 0.46s 1.2×
shade 0.71s 0.56s 1.3×
admin-x-design-system 0.81s 0.70s 1.2×
activitypub 3.66s 0.76s 4.8×
stats 5.24s 0.96s 5.5×
admin-x-settings 5.49s 1.14s 4.8×
posts 7.91s 1.02s 7.8×
admin 11.67s 1.36s 8.6×

Output is byte-equivalent — a clean single admin build is 14.94 MB / 129 chunks on Rolldown vs 15.05 MB / 142 chunks on Rollup (one shared en chunk and one koenig chunk each; no duplication).

Validation

  • All 8 apps build.
  • All frontend test suites pass under rolldown-vite (shade, admin-x-framework, posts, stats, admin-x-settings, activitypub, admin, admin-x-design-system — ~1,800 tests).
  • Confirmed public apps stay on stock Vite and portal still builds.

Note

While benchmarking I hit a latent quirk in apps/admin/vite-ember-assets.ts: closeBundle copies assets into dist/ and back without clearing, so repeated non-clean builds accumulate stale chunks. Not caused by this change and not fixed here — flagging for a small separate cleanup.

@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 33d56248-97cc-43e1-9a3f-8ff256cefe90

📥 Commits

Reviewing files that changed from the base of the PR and between 29be910 and 5ddc639.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • apps/activitypub/package.json
  • apps/admin-x-design-system/package.json
  • apps/admin-x-framework/package.json
  • apps/admin-x-settings/package.json
  • apps/admin/package.json
  • apps/posts/package.json
  • apps/shade/package.json
  • apps/stats/package.json
  • pnpm-workspace.yaml
✅ Files skipped from review due to trivial changes (1)
  • apps/admin-x-framework/package.json
🚧 Files skipped from review as they are similar to previous changes (8)
  • apps/admin-x-settings/package.json
  • apps/shade/package.json
  • pnpm-workspace.yaml
  • apps/stats/package.json
  • apps/posts/package.json
  • apps/admin-x-design-system/package.json
  • apps/activitypub/package.json
  • apps/admin/package.json

Walkthrough

Changes

The workspace now defines a catalog.rolldown entry that maps vite to npm:rolldown-vite@7.3.1 with comments describing its intended use. Several package manifests update their vite devDependency reference from the default catalog to catalog:rolldown.

Related issues: None specified.

Related PRs: None specified.

Suggested labels: dependencies, tooling

Suggested reviewers: None specified.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: admin-surface apps now use rolldown-vite.
Description check ✅ Passed The description accurately explains the Rolldown-vite catalog change and app opt-in scope.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch steve/pla-96-rolldown-admin-apps

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@9larsons 9larsons force-pushed the steve/pla-96-rolldown-admin-apps branch from 3a38789 to 62b6a8d Compare July 6, 2026 14:46
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@nx-cloud

nx-cloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 5ddc639

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 10m 1s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗
nx run ghost:test:ci:integration ✅ Succeeded 2m 42s View ↗
nx run-many -t test:unit -p @tryghost/activityp... ✅ Succeeded 7m 46s View ↗
nx run ghost:test:integration ✅ Succeeded 2m 40s View ↗
nx run @tryghost/admin:build ✅ Succeeded 3m 24s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 56s View ↗
nx run ghost-admin:test ✅ Succeeded 3m 3s View ↗
Additional runs (7) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-07 14:57:02 UTC

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.26%. Comparing base (7d9f285) to head (5ddc639).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29132      +/-   ##
==========================================
- Coverage   74.26%   74.26%   -0.01%     
==========================================
  Files        1566     1566              
  Lines      135737   135737              
  Branches    16444    16445       +1     
==========================================
- Hits       100805   100804       -1     
  Misses      33932    33932              
- Partials     1000     1001       +1     
Flag Coverage Δ
admin-tests 55.16% <ø> (-0.02%) ⬇️
e2e-tests 76.41% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 28800256568 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

1 similar comment
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 28800256568 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

@9larsons 9larsons force-pushed the steve/pla-96-rolldown-admin-apps branch from 62b6a8d to 29be910 Compare July 6, 2026 16:14
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 28806000400 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

@9larsons 9larsons marked this pull request as draft July 6, 2026 16:59
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 28812564719 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

ref https://linear.app/ghost/issue/PLA-96

- adds a `rolldown` named catalog (vite: npm:rolldown-vite@7.3.1) and points the 8
  admin-surface apps (posts, stats, admin, admin-x-framework, admin-x-settings,
  admin-x-design-system, shade, activitypub) at catalog:rolldown
- public UMD apps stay on stock vite until their own Rolldown config lands (#29141)
- the known Rolldown interop breakers are already fixed on main: shade Flag ESM
  swap (#29139), @svg-maps/world shim (#29143), @tryghost/i18n dual-format (#29144)
- verified: all 8 apps + the admin shell build clean under Rolldown; react/react-dom
  stay external (no dual-instance regression); only benign bundler-agnostic warnings
@9larsons 9larsons force-pushed the steve/pla-96-rolldown-admin-apps branch from 6afa9c9 to 5ddc639 Compare July 7, 2026 14:44
@9larsons 9larsons marked this pull request as ready for review July 7, 2026 14:46
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@9larsons 9larsons merged commit d0f7551 into main Jul 7, 2026
48 checks passed
@9larsons 9larsons deleted the steve/pla-96-rolldown-admin-apps branch July 7, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant